Skip to content

WIP OCPNODE-4529: Migrate test case 44493 - configurable terminationGracePeriodSeconds for probes#31170

Open
BhargaviGudi wants to merge 1 commit into
openshift:mainfrom
BhargaviGudi:migrate-44493
Open

WIP OCPNODE-4529: Migrate test case 44493 - configurable terminationGracePeriodSeconds for probes#31170
BhargaviGudi wants to merge 1 commit into
openshift:mainfrom
BhargaviGudi:migrate-44493

Conversation

@BhargaviGudi
Copy link
Copy Markdown
Contributor

@BhargaviGudi BhargaviGudi commented May 13, 2026

Summary

Migrates test case OCP-44493 from openshift-tests-private to origin.

Validates that Kubernetes liveness and startup probes honor their probe-level terminationGracePeriodSeconds setting instead of defaulting to the pod-level value.

Polarion

https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-44493

Bug

OCPBUGS-44493

Test Coverage

  • ✅ Liveness probe with probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
  • ✅ Startup probe with probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
  • ✅ Liveness probe without probe-level setting (falls back to pod-level 60s)

Implementation

  • Created pod resources inline (no templates)
  • Proper Ginkgo patterns (DeferCleanup, ote.Informing(), context-aware polling)
  • Helper functions return errors, all assertions in main test
  • Pod security context with RunAsNonRoot, SeccompProfile, drop ALL capabilities

Testing

```bash
./openshift-tests run-test "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriodSeconds to liveness and startup probes [OCP-44493]"
```

Summary by CodeRabbit

  • Tests
    • Added comprehensive e2e test suite validating configurable terminationGracePeriod for liveness and startup probes, including probe-level overrides, pod-level defaults, and graceful termination timing verification.

Test validates configurable terminationGracePeriodSeconds for liveness and startup probes.

Verifies that:
- Liveness probes honor probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
- Startup probes honor probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
- Probes without probe-level setting fall back to pod-level terminationGracePeriodSeconds (60s)
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@BhargaviGudi BhargaviGudi changed the title [OCPNODE-3812]: Migrate testcase 44493 - configurable terminationGracePeriodSeconds for probes WIP [OCPNODE-3812]: Migrate testcase 44493 - configurable terminationGracePeriodSeconds for probes May 13, 2026
@openshift-ci openshift-ci Bot requested review from asahay19 and sairameshv May 13, 2026 14:25
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BhargaviGudi
Once this PR has been reviewed and has the lgtm label, please assign mrunalp for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Walkthrough

A new Ginkgo e2e test is added to validate configurable terminationGracePeriodSeconds for Kubernetes liveness and startup probes. The test parses pod event timestamps, measures probe failure timing, and verifies the observed grace periods match configured values or pod-level defaults when probe-level settings are absent.

Changes

Probe Termination Grace Period E2E Test

Layer / File(s) Summary
Import updates and test scaffold
test/extended/node/node_e2e/node.go (lines 4–15)
Added context and strconv imports and reordered block to support duration parsing and context-aware event polling in the new test.
E2E test implementation with probe validation
test/extended/node/node_e2e/node.go (lines 166–433)
New test skips on non-empty cluster featureSet, defines helpers to parse Kubernetes duration strings and extract pod event timestamps via oc describe, creates pods with liveness and startup probes configured with varying terminationGracePeriodSeconds (10s probe-level and 60s pod-level), polls until restart timing matches expected grace-period window, and validates three scenarios: liveness with probe-level grace period, startup with probe-level grace period, and liveness fallback to pod-level when probe-level is absent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Suggested labels

jira/valid-reference

Suggested reviewers

  • bertinatto
  • cpmeadors
🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Test violates single responsibility by testing 3 distinct scenarios (liveness with probe-level period, startup with probe-level period, liveness with pod-level fallback) in one It block. Split into 3 separate It blocks, each testing one probe termination scenario for better isolation and clearer failure diagnostics.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Test title contains only static, descriptive strings with no dynamic values. Pod names are appropriately kept in test body, not title.
Microshift Test Compatibility ✅ Passed Test uses FeatureGate API (unavailable on MicroShift) but is protected by parent Describe block's BeforeEach hook that skips on MicroShift.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Test creates individual pods with probes on a single node. No multi-node assumptions: no node affinity, topology spread, or node-to-node communication required. All pods can coexist on SNO.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are test-only; no deployment, operator, or controller code modified. Test Pods have no scheduling constraints.
Ote Binary Stdout Contract ✅ Passed New test added within Ginkgo It() blocks (not process-level). No fmt.Print/Printf at process level. stdlib imports only. All logging via e2e.Logf().
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4 assumptions found. External images use content-addressable digests compatible with disconnected environments. All operations are cluster-internal.
Title check ✅ Passed The title clearly summarizes the main change: migrating test case OCP-44493 for configurable terminationGracePeriodSeconds on probes, which aligns with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@BhargaviGudi BhargaviGudi changed the title WIP [OCPNODE-3812]: Migrate testcase 44493 - configurable terminationGracePeriodSeconds for probes WIP [OCPNODE-4529]: Migrate testcase 44493 - configurable terminationGracePeriodSeconds for probes May 13, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
test/extended/node/node_e2e/node.go (4)

282-432: ⚡ Quick win

Three near-identical pod specs — extract a builder helper.

The three pods (liveness-probe, startup-probe, liveness-probe-no-term) duplicate ~50 lines of spec each (same image, security context, command, ports). Only the probe kind, name, and probe-level TerminationGracePeriodSeconds differ. A small builder would shrink the test by ~100 lines and make the differences explicit.

♻️ Sketch
buildProbePod := func(name string, probe *corev1.Probe, kind string) *corev1.Pod {
    container := corev1.Container{
        Name:    "test",
        Image:   "quay.io/openshifttest/nginx-alpine@sha256:04f316442d48ba60e3ea0b5a67eb89b0b667abf1c198a3d0056ca748736336a0",
        Command: []string{"bash", "-c", "sleep 100000000"},
        Ports:   []corev1.ContainerPort{{ContainerPort: 8080}},
        SecurityContext: &corev1.SecurityContext{
            AllowPrivilegeEscalation: ptr.To(false),
            Capabilities:             &corev1.Capabilities{Drop: []corev1.Capability{"ALL"}},
        },
    }
    switch kind {
    case "liveness":
        container.LivenessProbe = probe
    case "startup":
        container.StartupProbe = probe
    }
    return &corev1.Pod{
        ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
        Spec: corev1.PodSpec{
            TerminationGracePeriodSeconds: ptr.To[int64](60),
            SecurityContext: &corev1.PodSecurityContext{
                RunAsNonRoot:   ptr.To(true),
                SeccompProfile: &corev1.SeccompProfile{Type: corev1.SeccompProfileTypeRuntimeDefault},
            },
            Containers: []corev1.Container{container},
        },
    }
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/node.go` around lines 282 - 432, The three pod
specs (liveness-probe, startup-probe, liveness-probe-no-term) duplicate
container/image/security/command/ports setup — extract a builder like
buildProbePod(name string, probe *corev1.Probe, kind string) that constructs the
common corev1.Container (Image, Command, Ports, SecurityContext) and attaches
either LivenessProbe or StartupProbe based on kind, and returns the full
*corev1.Pod with the shared PodSpec (pod-level TerminationGracePeriodSeconds and
PodSecurityContext); replace the three inline pod literals with calls to
buildProbePod("liveness-probe", livenessProbe, "liveness"),
buildProbePod("startup-probe", startupProbe, "startup") and
buildProbePod("liveness-probe-no-term", nil, "liveness") and keep
verifyProbeTermination calls unchanged.

216-279: 🏗️ Heavy lift

Use the Events API directly instead of parsing humanized oc describe output.

The helper extracts timestamps by splitting describe output and indexing fields[2]. This is fragile:

  • The "Age" column position depends on the describe template and event aggregation. While aggregated events (e.g., 60s (x3 over 90s)) keep the last-seen value at fields[2], any format change breaks parsing silently.
  • The substring match "Started container" and multi-substring match for probe failures could match unrelated events if more containers are added.

Use the Events API directly: query oc.KubeClient().CoreV1().Events(namespace).List(...), filter by involvedObject and reason (Started, Killing), and consume event.FirstTimestamp / event.LastTimestamp directly without parsing humanized durations. This pattern is idiomatic across the test suite.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/node.go` around lines 216 - 279, The current
verifyProbeTermination function is brittle because it parses humanized `oc
describe` output and indexes fields[2]; replace that logic with a direct Events
API query: inside verifyProbeTermination (and remove dependence on
parseDurationToSeconds), call
oc.KubeClient().CoreV1().Events(namespace).List(...) (or use the client wrapper
available in the test helpers), filter events by event.InvolvedObject.Name ==
podName and by event.Reason == "Started" for container starts and event.Reason
== "Killing" (or the probe-failure reason used by your cluster) for
probe/termination events, then use the event.FirstTimestamp/LastTimestamp fields
to compute seconds difference and compare to expectedTerminationSec with the
same tolerance logic; log the selected event timestamps and keep the
polling/wait.PollUntilContextTimeout wrapper and return true when the time diff
is within range.

185-213: ⚡ Quick win

Replace custom duration parser with time.ParseDuration.

The Go standard library already parses the exact formats kubectl emits ("45s", "1m30s", "1h2m3s"). The current implementation silently returns 0, nil for unrecognized inputs (e.g., "5h" since it matches neither the "m" nor "s" branches), which would cause downstream timing arithmetic to be wrong without surfacing an error. Switching to time.ParseDuration removes the custom code path and the silent-zero failure mode.

♻️ Proposed refactor
-		// Helper function to parse duration string like "1m30s" or "45s" to seconds
-		parseDurationToSeconds := func(durationStr string) (int, error) {
-			var totalSeconds int
-			if strings.Contains(durationStr, "m") {
-				parts := strings.Split(durationStr, "m")
-				minutes, err := strconv.Atoi(parts[0])
-				if err != nil {
-					return 0, err
-				}
-				totalSeconds = minutes * 60
-				if len(parts) > 1 && strings.Contains(parts[1], "s") {
-					secStr := strings.TrimSuffix(parts[1], "s")
-					if secStr != "" {
-						seconds, err := strconv.Atoi(secStr)
-						if err != nil {
-							return 0, err
-						}
-						totalSeconds += seconds
-					}
-				}
-			} else if strings.Contains(durationStr, "s") {
-				secStr := strings.TrimSuffix(durationStr, "s")
-				seconds, err := strconv.Atoi(secStr)
-				if err != nil {
-					return 0, err
-				}
-				totalSeconds = seconds
-			}
-			return totalSeconds, nil
-		}
+		// Helper function to parse duration string like "1m30s" or "45s" to seconds
+		parseDurationToSeconds := func(durationStr string) (int, error) {
+			d, err := time.ParseDuration(durationStr)
+			if err != nil {
+				return 0, err
+			}
+			return int(d.Seconds()), nil
+		}

The strconv import can then be removed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/node.go` around lines 185 - 213, The custom
parser function parseDurationToSeconds should be replaced to use
time.ParseDuration: call time.ParseDuration(durationStr), return
int(duration.Seconds()) on success and propagate the error on failure so
unrecognized inputs (e.g., "5h") don't silently return 0; update the function
signature/returns accordingly, remove the now-unused strconv import, and ensure
callers still get an int number of seconds from the parsed duration.

288-291: 💤 Low value

Use a pointer helper instead of &[]T{v}[0].

The &[]int64{60}[0] / &[]bool{true}[0] pattern (used 11 times in this test) allocates a single-element slice solely to take its address. Prefer ptr.To from k8s.io/utils/ptr for clarity and consistency with the rest of the k8s ecosystem.

♻️ Example refactor
 import (
   ...
+  "k8s.io/utils/ptr"
   ...
 )
-				TerminationGracePeriodSeconds: &[]int64{60}[0],
+				TerminationGracePeriodSeconds: ptr.To[int64](60),
 				SecurityContext: &corev1.PodSecurityContext{
-					RunAsNonRoot: &[]bool{true}[0],
+					RunAsNonRoot: ptr.To(true),
 					...
 				},
 				...
-							AllowPrivilegeEscalation: &[]bool{false}[0],
+							AllowPrivilegeEscalation: ptr.To(false),
 							...
-							TerminationGracePeriodSeconds: &[]int64{10}[0],
+							TerminationGracePeriodSeconds: ptr.To[int64](10),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/node.go` around lines 288 - 291, Replace the
hacky &[]T{v}[0] pointer constructions with the ptr.To helper from
k8s.io/utils/ptr for clarity and consistency: e.g. change
TerminationGracePeriodSeconds: &[]int64{60}[0] to use ptr.To(int64(60)) and
RunAsNonRoot: &[]bool{true}[0] to ptr.To(true); update all other similar
occurrences (about 11 spots) in this file (look for
TerminationGracePeriodSeconds, RunAsNonRoot, SeccompProfile usages) and add the
import for "k8s.io/utils/ptr" if not already present.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/extended/node/node_e2e/node.go`:
- Line 170: Update the test title string used in g.It to reference the correct
Kubernetes field name "terminationGracePeriodSeconds" (currently
"terminationGracePeriod") and ensure any Polarion title/identifier used in the
same test block is updated to match; locate the g.It invocation (the test named
"[OTP] add configurable terminationGracePeriod to liveness and startup probes
[OCP-44493]") and change the human-readable title and Polarion metadata to use
"terminationGracePeriodSeconds" so the test name matches the PR description and
API field.

---

Nitpick comments:
In `@test/extended/node/node_e2e/node.go`:
- Around line 282-432: The three pod specs (liveness-probe, startup-probe,
liveness-probe-no-term) duplicate container/image/security/command/ports setup —
extract a builder like buildProbePod(name string, probe *corev1.Probe, kind
string) that constructs the common corev1.Container (Image, Command, Ports,
SecurityContext) and attaches either LivenessProbe or StartupProbe based on
kind, and returns the full *corev1.Pod with the shared PodSpec (pod-level
TerminationGracePeriodSeconds and PodSecurityContext); replace the three inline
pod literals with calls to buildProbePod("liveness-probe", livenessProbe,
"liveness"), buildProbePod("startup-probe", startupProbe, "startup") and
buildProbePod("liveness-probe-no-term", nil, "liveness") and keep
verifyProbeTermination calls unchanged.
- Around line 216-279: The current verifyProbeTermination function is brittle
because it parses humanized `oc describe` output and indexes fields[2]; replace
that logic with a direct Events API query: inside verifyProbeTermination (and
remove dependence on parseDurationToSeconds), call
oc.KubeClient().CoreV1().Events(namespace).List(...) (or use the client wrapper
available in the test helpers), filter events by event.InvolvedObject.Name ==
podName and by event.Reason == "Started" for container starts and event.Reason
== "Killing" (or the probe-failure reason used by your cluster) for
probe/termination events, then use the event.FirstTimestamp/LastTimestamp fields
to compute seconds difference and compare to expectedTerminationSec with the
same tolerance logic; log the selected event timestamps and keep the
polling/wait.PollUntilContextTimeout wrapper and return true when the time diff
is within range.
- Around line 185-213: The custom parser function parseDurationToSeconds should
be replaced to use time.ParseDuration: call time.ParseDuration(durationStr),
return int(duration.Seconds()) on success and propagate the error on failure so
unrecognized inputs (e.g., "5h") don't silently return 0; update the function
signature/returns accordingly, remove the now-unused strconv import, and ensure
callers still get an int number of seconds from the parsed duration.
- Around line 288-291: Replace the hacky &[]T{v}[0] pointer constructions with
the ptr.To helper from k8s.io/utils/ptr for clarity and consistency: e.g. change
TerminationGracePeriodSeconds: &[]int64{60}[0] to use ptr.To(int64(60)) and
RunAsNonRoot: &[]bool{true}[0] to ptr.To(true); update all other similar
occurrences (about 11 spots) in this file (look for
TerminationGracePeriodSeconds, RunAsNonRoot, SeccompProfile usages) and add the
import for "k8s.io/utils/ptr" if not already present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 3b8a78f5-42e4-4bc0-921b-438671a54f52

📥 Commits

Reviewing files that changed from the base of the PR and between 793d403 and b783cc7.

📒 Files selected for processing (1)
  • test/extended/node/node_e2e/node.go

//author: minmli@redhat.com
//migrated from openshift-tests-private
//automates: https://issues.redhat.com/browse/OCPBUGS-44493
g.It("[OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493]", ote.Informing(), func() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Test name doesn't match the run command in the PR description.

Line 170 uses terminationGracePeriod (no “Seconds”), but the PR description's test command targets terminationGracePeriodSeconds. The Kubernetes API field is terminationGracePeriodSeconds; align the title to match (and ensure the Polarion title matches as well).

📝 Proposed fix
-	g.It("[OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493]", ote.Informing(), func() {
+	g.It("[OTP] add configurable terminationGracePeriodSeconds to liveness and startup probes [OCP-44493]", ote.Informing(), func() {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
g.It("[OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493]", ote.Informing(), func() {
g.It("[OTP] add configurable terminationGracePeriodSeconds to liveness and startup probes [OCP-44493]", ote.Informing(), func() {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extended/node/node_e2e/node.go` at line 170, Update the test title
string used in g.It to reference the correct Kubernetes field name
"terminationGracePeriodSeconds" (currently "terminationGracePeriod") and ensure
any Polarion title/identifier used in the same test block is updated to match;
locate the g.It invocation (the test named "[OTP] add configurable
terminationGracePeriod to liveness and startup probes [OCP-44493]") and change
the human-readable title and Polarion metadata to use
"terminationGracePeriodSeconds" so the test name matches the PR description and
API field.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

@BhargaviGudi: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-trt
Copy link
Copy Markdown

openshift-trt Bot commented May 13, 2026

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: b783cc7

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-aws-ovn-fips High - "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" is a new test that failed 1 time(s) against the current commit
pull-ci-openshift-origin-main-e2e-gcp-ovn High - "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" is a new test that failed 1 time(s) against the current commit
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6 High - "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" is a new test that failed 1 time(s) against the current commit
pull-ci-openshift-origin-main-e2e-vsphere-ovn High - "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" is a new test that failed 1 time(s) against the current commit
pull-ci-openshift-origin-main-e2e-vsphere-ovn-upi High - "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" is a new test that failed 1 time(s) against the current commit

New tests seen in this PR at sha: b783cc7

  • "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriod to liveness and startup probes [OCP-44493] [Suite:openshift/conformance/parallel]" [Total: 5, Pass: 0, Fail: 5, Flake: 0]

@BhargaviGudi BhargaviGudi changed the title WIP [OCPNODE-4529]: Migrate testcase 44493 - configurable terminationGracePeriodSeconds for probes WIP OCPNODE-4529: Migrate test case 44493 - configurable terminationGracePeriodSeconds for probes May 14, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 14, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 14, 2026

@BhargaviGudi: This pull request references OCPNODE-4529 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Migrates test case OCP-44493 from openshift-tests-private to origin.

Validates that Kubernetes liveness and startup probes honor their probe-level terminationGracePeriodSeconds setting instead of defaulting to the pod-level value.

Polarion

https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-44493

Bug

OCPBUGS-44493

Test Coverage

  • ✅ Liveness probe with probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
  • ✅ Startup probe with probe-level terminationGracePeriodSeconds (10s vs pod-level 60s)
  • ✅ Liveness probe without probe-level setting (falls back to pod-level 60s)

Implementation

  • Created pod resources inline (no templates)
  • Proper Ginkgo patterns (DeferCleanup, ote.Informing(), context-aware polling)
  • Helper functions return errors, all assertions in main test
  • Pod security context with RunAsNonRoot, SeccompProfile, drop ALL capabilities

Testing

```bash
./openshift-tests run-test "[sig-node] [Jira:Node/Kubelet] Kubelet, CRI-O, CPU manager [OTP] add configurable terminationGracePeriodSeconds to liveness and startup probes [OCP-44493]"
```

Summary by CodeRabbit

  • Tests
  • Added comprehensive e2e test suite validating configurable terminationGracePeriod for liveness and startup probes, including probe-level overrides, pod-level defaults, and graceful termination timing verification.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 16, 2026

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants